<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>加性操作符(减法)</title>
    <script>
        let result1 = 10 - true;//9 true被转化为1
        let result2 = NaN - 1; //NaN
        let result3 = 10 - 2;//8
        let result4 = 10 - "";//10 ""被转化为0
        let result5 = 10 - null;//10 null被转换为0
        let result6 = 10 - "2";//8 "2"被转换为2

        console.log("result1 : " + result1);
        console.log("result2 : " + result2);
        console.log("result3 : " + result3);
        console.log("result4 : " + result4);
        console.log("result5 : " + result5);
        console.log("result6 : " + result6);

    </script>
</head>
<body>
加性操作符(减法)
</body>
</html>